//
// Created by 215609 on 2024/7/2.
//

#ifndef AUDIOCAMERA_TSCALLJAVA_H
#define AUDIOCAMERA_TSCALLJAVA_H


#define MAIN_THREAD 0
#define CHILD_THREAD 1
/**
 * java 回调
 */

#include <jni.h>

class TsCallJava {

public:
    TsCallJava(_JavaVM *javaVM, JNIEnv *env, jobject obj);

    ~TsCallJava();

    void onCallParpared(int type) const;

    void onCallTimeInfo(int type,int curr,int total) const;

public:
    _JavaVM *mjavaVm=nullptr;

    JNIEnv  *jniEnv=nullptr;

    jobject  jobj;

    jmethodID jmid_parpared{};

    jmethodID  jmid_timeinfo{};
};


#endif //AUDIOCAMERA_TSCALLJAVA_H
